﻿using System;
using Luna.Data;
using Luna.Data.Configuration;
using Rhino.Mocks;

namespace Luna.Services.Test.Configuration
{
    public class ConfigurationDataCreator : DataCreator
    {
        public void Setup(IDataContext P_Context)
        {
            P_Context.Stub(x => x.Create<IConnectorData>()).Return(CreateConnectorData());
        }

        public void Configure()
        {
        }

        private const string LOGIN = "Name";
        private const string PASSWORD = "Code";
        private const string PARAMS = "Params";

        public IConnectorData CreateConnectorData()
        {
            IConnectorData L_Return = MockRepository.GenerateStub<IConnectorData>();

            L_Return.Login = GetString(LOGIN);
            L_Return.Password = GetString(PASSWORD);
            L_Return.Params = GetString(PARAMS);
            L_Return.PK = Guid.NewGuid();

            return L_Return;
        }
    }
}